package com.stq.weixin.model.response;

/**
 * @author stqsht@163.com
 * @date 2020-01-28 15:15
 */
public enum WeiXinErrCodeEnum {
    ERRCODE_NEGATIVE_2(-2,"缺少参数必填项"),
    ERRCODE_NEGATIVE_1(-1,"系统错误"),
    SUCCESS(0,"请求成功"),
    ERRCODE_40001(40001,"AppSecret 错误或者 AppSecret 不属于这个小程序"),
    ERRCODE_40002(40002,"请确保 grant_type 字段值为 client_credential"),
    ERRCODE_40013(40013,"不合法的 AppID"),
    ;
    /**
     * 错误号
     */
    private int errcode;
    /**
     * 错误信息
     */
    private String errmsg;

    private WeiXinErrCodeEnum(int errcode, String errmsg) {
        this.errcode = errcode;
        this.errmsg = errmsg;
    }

    public int getErrcode() {
        return errcode;
    }

    public String getErrmsg() {
        return errmsg;
    }
}
